package com.pigs.pigsordersystem.entity;

import java.math.BigDecimal;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

/**
 * @author Y.yang
 * @since 2020-03-14
 *  财务实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@ApiModel("财务实体类")
@TableName("finance")
public class FinanceEntity extends BaseEntity{
    /**
     * id
     */
    @ApiModelProperty(value = "id",required = true)
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 产品id
     */
    @ApiModelProperty(value = "产品id",required = true)
    private Integer productId;

    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id",required = true)
    private Integer usersId;

    /**
     * 总金额
     */
    @ApiModelProperty(value = "总金额",required = true)
    private Double aggregatePrice;

    /**
     * 总购买的数量
     */
    @ApiModelProperty(value = "购买数量",required = true)
    private Integer productNum;

    @Override
    public String toString() {
        return "FinanceEntity{" +
                "id=" + id +
                ", productId=" + productId +
                ", usersId=" + usersId +
                ", aggregatePrice=" + aggregatePrice +
                ", productNum=" + productNum +
                ", CreateTime=" + super.getCreateTime() +
                '}';
    }
}
